all:
	killall 'chromedriver' 'chrome_crashpad_handler' || true
	python3 src/app.py
zip:
	pyinstaller -F src/app.py
	ifeq ($(OS), Windows_NT)
		zip -r seeyon-win.zip dist/app.exe dist/chromedriver.exe setup README.md
	else
		zip -r seeyon-mac-arm.zip dist/app dist/chromedriver setup README.md
	endif
	pip freeze > requirements.txt
	pip download -r requirements.txt -d ./pip_packages
env:
	pyinstaller --version || brew install pyinstaller
	python3 -V || brew install python3
	python3 -m pip install selenium
	upx -V || brew install --build-from-source upx  # pyinstaller打包exe配合upx压缩
	'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' --version || oppen setup/ChromSetup.url
	chromedriver --version || open setup/ChromeDriver.url
whl:
	pip install --no-index --find-links=./pip_packages -r requirements.txt
cls:
	kill $(ps aux|grep hrome|grep -v grep|awk '{print $2}')
